#!/bin/bash
# 执行脚本之前需要先启动 docker/docker-compose/docker-compose.yml
# docker-compose up -d

# 复制 grafana 数据
cp -r /var/lib/docker/volumes/docker-compose_grafana_conf/* ./etc-grafana
cp -r /var/lib/docker/volumes/docker-compose_grafana_data/* ./grafanadata
chown -R 472:472 ./grafanadata

# 复制 prometheus 数据
cp -r /var/lib/docker/volumes/docker-compose_prometheus_data/* ./prometheusdata
chown -R nobody:nogroup ./prometheusdata
